home *** CD-ROM | disk | FTP | other *** search
- %OP%VS4.13 (28-Apr-92), Gerald L Fitton, R4000 5966 9904 9938
- %OP%DP0
- %OP%IRY
- %OP%PL0
- %OP%HM0
- %OP%FM0
- %OP%BM0
- %OP%LM4
- %OP%PT1
- %OP%PDPipeLine
- %OP%WC1014,2262,252,1748,0,0,0,0
- %CO:A,72,72%
- %C%Slot References to Strings
- %C%by Gerald L Fitton
- Keywords:
- Fitton
-
- Slot references to strings
- Since PipeDream 4 now has comprehensive string handling, the action of
- references to a text slot or a slot containing a string is different
- from PipeDream 3. Load the file [Strings] and see what you get with
- your version of PipeDream 4. I have version 4.11 at the moment so the
- following summary may be changed. Please let me know if you find a
- difference and that will remind me to update this text.
-
- One subtle difference between PipeDream 3 and PipeDream 4 is that a
- reference to a slot containing text greturns right aligned text even
- when reference is made to a left aligned slot containing text. Have a
- look at [Strings]C8. It refers to [Strings]A2 which contains the text
- Hello. In [Strings]A2 the text is left aligned, in [Strings]C8 (which
- contains the slot reference A2) the text is right aligned. You can
- 'correct' this, as I have done with many of the files on this disc, by
- giving the command <Ctrl LAL> (Layout Align Left).
-
- Here is a summary. Suppose:
-
- A1 contains: nothing
- A2 contains text slot: Hello
- A3 contains number slot: "Hello"
- A4 contains number slot: 0
- A5 contains number slot: " "
-
- Formula in PipeDream PD 3 PD 4
-
- A1 0 blank
- A2 Hello Hello
- A3 Hello Hello
- A4 0 0
- A5 0
-
- 1+A1 1 1
- 1+A2 Hello Error
- 1+A3 Hello Error
- 1+A4 1 1
- 1+A5 1 1
-
- if(A1="","Blank",if(A1=0,"Zero","Not empty")) 1 Blank
- if(A2="","Blank",if(A2=0,"Zero","Not empty")) Not empty Not empty
- if(A3="","Blank",if(A3=0,"Zero","Not empty")) Not empty Not empty
- if(A4="","Blank",if(A4=0,"Zero","Not empty")) 1 Zero
- if(A5="","Blank",if(A5=0,"Zero","Not empty")) 1 Blank
-
- If you get the error message "String not expected" it's probably
- because of an explicit reference to a slot containing a string.
-
- Functions like sum() are not affected since they are defined to ignore
- non-numeric slots.
-
-
- %C%Comparison Rules
- %C%by Gerald L Fitton
- Keywords:
- Compare Comparison Fitton
-
- Many spreadsheet commands such as if(condition,true,false) and
- davg(range,condition) require a comparison between a numerical value
- and some text.
-
- PipeDream 3
- I know you may not be interested in PipeDream 3 but this is what
- happens in PipeDream 3. Numbers are always smaller than text so that
- if(C21>="", true, false) will treat the condition as TRUE (and work out
- the true formula) if it contains any text. Dates are greater than
- text. Blank numeric cells are forced to match zero except for such
- functions as avg(range) which treat a blank as nonexistent when
- calculating the divisor.
-
- PipeDream 4
- The disc file [Compare] in this directory shows what happens when you
- make the same comparisons in PipeDream 4. I am having trouble with
- interpreting what is happening. I have version 4.11. The
- file [Compare] shows the result of comparing a -1, 0, +1, a blank cell
- and a cell containing a date with a blank, a text cell and a cell
- containing a date. If you study the formula in the file [Compare] it
- may help you to if you find comparisons difficult.
-
- Let me know how you get on with later versions of PipeDream 4.
-
-
-
- %C%Text in Numeric Slots
- %C%by Gerald L Fitton
- Keywords:
- Text Numbers Fiton
-
- What is the value returned by a formula that usually refers to a cell
- with a number in it but which, for some reason, contains text instead?
- Take as an example a file of invoices with £s in column C and the 15%PC%
- VAT extension in column D. The VAT in D21 is worked out with the
- function 0.15*C21 (or, if you prefer, (INT(15*C21+0.99))/100 to round
- up) but what if you can't find the invoice and want to write a comment
- in C21 (eg Lost Invoice) instead of a value? In column D the formula
- returns the words (String not expected) from C21. Perhaps you don't
- want this, you may want either a blank or a 0. The way to get a zero
- is to use an if construct such as if(C21>="!",0,(0.15*C21)). The file
- VatFile in this directory is an example.
-
- PipeDream 4 treats text in numeric slots this way so that, if you make
- a mistake (or should I say when!) the words are displayed to show you
- that there has been a mistake. If the value of the text were made 0
- automatically then you wouldn't spot the error so easily.
-